import edu.ucla.cs.typecast.rmi.TypeCastServer;


public class RMIServer {

	public static void main(String[] args) { 
        try { 
            TypeCastServer server = new TypeCastServer(); 
            for(int i=0; i<args.length; i++) { 
                System.out.println("Exporting service " + args[i]);
                Class serviceImplClass = Class.forName(args[i]); 
                server.export(serviceImplClass.newInstance()); 
            }
        } catch(Throwable t) { 
            t.printStackTrace(); 
        }
    }
}
